package com.industry.framework.core.generic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.industry.framework.core.generic.record.dataobject.dto.RecordDto;
import com.industry.framework.core.generic.record.dataobject.entity.RecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author nbZhuozh
 * @Date 2025-03-26  11:34
 **/
@Mapper
public interface RecordTempMapper extends BaseMapper {

    Integer countTable(@Param("tableName") String tableName);

    void createTableIfNotExists(@Param("tableName") String tableName);

    void insertBatch(@Param("tableName") String tableName , @Param("recordEntityList") List<RecordEntity> recordEntityList);

    //根据业务id 查询操作记录
    List<RecordDto> queryRecordsByDetail(@Param("tableName") String tableName , @Param("bizId") String bizId);

    //根据业务id 查询操作记录
    List<RecordDto> queryRecordsByDetailWrapper(@Param("tableName") String tableName , @Param("bizId") String bizId , @Param("content") String content);
}
